package com.yipingnai.blog.controller;

import com.yipingnai.blog.model.Category;
import com.yipingnai.blog.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: jiangym
 * @Date: 2020/4/11 12:59
 */
@RestController
@RequestMapping("/blog/category")
public class CategoryController {

    @Autowired
    CategoryService categoryService;

    @GetMapping("/")
    public List<Category> getIsUseCategories(){
        return categoryService.getIsUseCategories();
    }
}
